package cang.string.Day04.io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo02 {
    public static void main(String[] args) throws IOException {

        FileInputStream in = new FileInputStream("./11.jpg");
        FileOutputStream out = new FileOutputStream("./22.jpg");
        byte[] B = new byte[1024*8];
        int b;
        long t1=System.currentTimeMillis();
        while ((b=in.read(B))!=-1){
            out.write(B,0,b);
        }
        in.close();
        out.close();
        long t2=System.currentTimeMillis();
        System.out.println(t2-t1);


    }
}
